home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / winvn060.arc / WVAUTH.C < prev    next >
C/C++ Source or Header  |  1991-07-01  |  2KB  |  63 lines

  1. /*--- WVAUTH.C -- Routines for authentication in WinVN
  2.  *
  3.  *   Mark Riordan  14 August 1990
  4.  */
  5.  
  6. #include <windows.h>
  7.  
  8. unsigned int newdes_buf(unsigned char *buf,unsigned int block_length);
  9. void newdes_block(unsigned char *block);
  10. void newdes_set_key_encipher(unsigned char *key);
  11. void newdes_set_key_decipher(unsigned char *key);
  12.  
  13. int uuencode(unsigned char *bufin,unsigned int nbytes,
  14.   unsigned char *bufcoded);
  15. int uudecode(unsigned char *bufcoded,unsigned char *bufplain);
  16.  
  17.  
  18. static unsigned char key[] = {
  19.   0x58, 0x20, 0x41, 0xaf, 0xb4, 0xce, 0x58, 0xbb, 0xb0,
  20.   0x1a, 0xaf, 0x6e, 0x00, 0x5e, 0x60
  21. };
  22.  
  23.  
  24. /*--- function AuthenticatePosting --------------------------------
  25.  *
  26.  *   Determine whether the user has sent valid authentication
  27.  *   information to the host.
  28.  *
  29.  *    Entry    Authorized  is TRUE if we're already authorized.
  30.  *
  31.  *    Exit     Returns TRUE if we are authorized, else FALSE.
  32.  *
  33.  *    Method   If we're already authorized, just return TRUE.
  34.  *             Otherwise, make sure the comm channel to the server
  35.  *             isn't busy.  If it is, put up a message to that
  36.  *             effect and quit.
  37.  *             If not busy, get authorization information from the
  38.  *             user and present it to the server (in encoded form).
  39.  *             Wait until the server responds or until the Abort
  40.  *             Protocol flag is set (by the user via a menu).
  41.  *             If authorized, return TRUE, else put up a
  42.  *             message to the user and return FALSE.
  43.  */
  44. BOOL
  45. AuthenticatePosting()
  46. {
  47.  
  48. }
  49.  
  50. /*-- function WinVnAuthDlg ---------------------------------------
  51.  *
  52.  *  Window function to handle Save Article dialog box.
  53.  */
  54.  
  55. BOOL FAR PASCAL WinVnAuthDlg(hDlg, iMessage, wParam, lParam)
  56. HWND      hDlg;
  57. unsigned  iMessage;
  58. WORD      wParam;
  59. LONG      lParam;
  60. {
  61.  
  62. }
  63.